package com.maysev.myjob_backend.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author 五七
 * @create 2023-03-16 15:23
 * @description:
 */
@Data
public class Student implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    private String username;

    private String password;

    private String realName;

    private String nickName;

    private String gender;

    private String email;

    /*@JsonFormat 默认是标准时区的时间，多出现少8小时的情况
            使用时，按需求加上时区 北京时间 东八区 timezone=”GMT+8”
            作用：后台的时间 格式化 发送到前台
     @DateTimeFormat 接受前台的时间格式 传到后台的格式*/
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    //大学名称
    private String university;

    private String avatar;
    //专业
    private String major;
    //学历
    private String education;

    //学生认证材料
    private String stuAuthPhoto;

    //实名认证状态
    private String  perStatus;

    //学生认证状态
    private String stuStatus;

    //入学时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    //毕业时间
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    private String role;

    private String status;

    //省
    private String province;

    //市
    private String city;

    //区
    private String district;

    private BigDecimal balance;

    private BigDecimal freezeBalance;

    private String isVerified;

    private String verificationInfo;

    private LocalDateTime verificationTime;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
